package pyx.crazycards.server.core;

import javaactor.library.core.Message;
import javaactor.library.core.Process;
import javaactor.library.core.Registry;
import javaactor.library.core.annotations.Actor;
import javaactor.library.core.exception.JavaActorException;
import pyx.crazycards.server.messages.AuthenticationMsg;

@Actor(name="Authenticator")
public class AuthenticatorActor extends Process{

	@Override
	public void react(Message message) throws JavaActorException {
		if(message.getName().equals("Authenticate")) {
			AuthenticationMsg msg = (AuthenticationMsg) message;

			//TODO authenticate
			
			Registry.send(ReplyRemoteActor.class, msg);
		}
	}

}
